<div id="search_box">
Search: <input id="search_criteria" name="search_criteria" tokens="," type="text" value="" />
<div class="name_auto_complete" id="auto_complete" style=" z-index:4"></div>
<script type="text/javascript">
//<![CDATA[
new Ajax.Autocompleter('search_criteria', 'auto_complete', '/search/auto_complete', 
    { onlyLatestOfClass: 'live_search',
    indicator: 'search_indicator',
    updateElement: function(selectedElement) 
        { 
             window.location=selectedElement.id; 
        } 
    } 
);
//]]>
</script>
<%= image_tag "working.gif", :style => "display: none;", :id => "search_indicator" %>
</div>